本文整理汇总了TypeScript中shared-utils/painterState.getFrame函数的典型用法代码示例。如果您正苦于以下问题:TypeScript getFrame函数的具体用法?TypeScript getFrame怎么用?TypeScript getFrame使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getFrame函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: each
each((img, key) => {
textures[key] = getFrame(painter, key).update({
texture: {
minFilter: 'LINEAR_MIPMAP_LINEAR',
magFilter: 'LINEAR',
asset: img,
},
})
}, s.tiles.images)
开发者ID:trivial-space,项目名称:playground,代码行数:9,代码来源:renderer.ts
示例2: getFrame
export const videoLights = videoTextures.map((t, i) => {
const id = 'vref' + i
return getFrame(painter, id).update({
bufferStructure: [
{
minFilter: 'LINEAR',
magFilter: 'LINEAR',
},
],
width: reflSize,
height: reflSize,
layers: getBlurByAlphaEffect(painter, id, {
strength: 4,
size: [reflSize, reflSize],
startFrame: t,
}),
})
})
开发者ID:trivial-space,项目名称:playground,代码行数:18,代码来源:renderer.ts
示例3: getLayer
state.viewPort.camera.viewMat,
floorMirrorMatrix as any,
),
projection: () => state.viewPort.camera.projectionMat,
},
drawSettings: {
clearBits: gl.DEPTH_BUFFER_BIT | gl.COLOR_BUFFER_BIT,
},
})
const scene = getLayer(painter, 'scene').update({
sketches: [groundSketch, wallsSketch],
uniforms: {
view: () => state.viewPort.camera.viewMat,
projection: () => state.viewPort.camera.projectionMat,
},
drawSettings: {
clearBits: gl.DEPTH_BUFFER_BIT | gl.COLOR_BUFFER_BIT,
},
})
const blurEffect = getBlurByAlphaEffect(painter, 'blur', {
strength: 10,
strengthOffset: 0.3,
blurRatioVertical: 3,
})
export const main = getFrame(painter, 'main').update({
layers: [mirrorScene, blurEffect, scene],
})
开发者ID:trivial-space,项目名称:playground,代码行数:30,代码来源:renderer.ts
示例4: plane
// Forms
const geometry = plane(10, 10, 0, 0)
const planeForm = getForm(painter, 'plane').update(geometry)
// Shades
const geoShade = getShade(painter, 'geo').update({
frag,
vert,
})
// Textures
const texture = getFrame(painter, 'tex').update({ texture: {} })
const img = new Image()
img.onload = () => {
texture.update({
texture: {
asset: img,
minFilter: 'LINEAR_MIPMAP_LINEAR',
magFilter: 'LINEAR',
},
})
}
img.src = 'tree.jpg'
// Sketches
开发者ID:trivial-space,项目名称:playground,代码行数:29,代码来源:renderer.ts
示例5: getFrame
getEffect,
getForm,
getFrame,
getShade,
getSketch,
} from 'shared-utils/painterState'
import { makeClear } from 'tvs-painter/dist/utils/context'
import { plane } from 'tvs-painter/dist/utils/geometry/plane'
import { events, gl, paint, painter } from './context'
import base from './glsl/base.frag'
import planeFrag from './glsl/plane-material.frag'
import planeVert from './glsl/plane-material.vert'
// ===== gof layers =====
const paintFrame = getFrame(painter, 'paint')
const bufferSize = 256
const effect = getEffect(painter, 'layer').update({
frag: base,
uniforms: {
size: bufferSize,
paint: () => paintFrame.image(),
previous: '0',
},
})
export const automaton = getFrame(painter, 'automaton').update({
layers: effect,
selfReferencing: true,
开发者ID:trivial-space,项目名称:playground,代码行数:31,代码来源:renderer.ts
示例6: getLayer
const points = getLayer(painter, 'points').update({
sketches: [pointsSketch],
uniforms: { size: () => [canvas.width, canvas.height] },
drawSettings: {
clearColor: [0, 0, 0, 1],
clearBits: gl.COLOR_BUFFER_BIT,
enable: [gl.BLEND],
blendFunc: [gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA],
},
})
const currentTriple = getEffect(painter, 'sides').update({
frag: sideFrag,
})
const current = getFrame(painter, 'current').update({
layers: [points, currentTriple],
})
const blend = getEffect(painter, 'blend').update({
frag: blendFrag,
uniforms: {
previous: '0',
current: () => current.image(),
},
})
const main = getFrame(painter, 'main').update({
layers: blend,
selfReferencing: true,
})
开发者ID:trivial-space,项目名称:playground,代码行数:31,代码来源:index.ts
示例7: getBlurByAlphaEffect
state.ground.mirrorMatrix as any,
),
projection: () => state.viewPort.camera.projectionMat,
withDistance: 1,
groundHeight: () => state.ground.position[1],
},
})
const blurEffect = getBlurByAlphaEffect(painter, 'blur', {
strength: 4,
strengthOffset: 0.3,
blurRatioVertical: 3,
size: [256, 256],
})
export const mirrorScene = getFrame(painter, 'mirror').update({
layers: [mirrorSceneLayer, blurEffect],
width: 256,
height: 256,
bufferStructure: [
{
magFilter: 'LINEAR',
minFilter: 'LINEAR',
},
],
})
export const scene = getFrame(painter, 'scene').update({
layers: sceneLayer,
})
开发者ID:trivial-space,项目名称:playground,代码行数:30,代码来源:renderer.ts
注:本文中的shared-utils/painterState.getFrame函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论