diff --git a/Demos/ngeParticleEmitter/assets/env/studio.env b/Demos/ngeParticleEmitter/assets/env/studio.env new file mode 100644 index 0000000..a93c8e7 Binary files /dev/null and b/Demos/ngeParticleEmitter/assets/env/studio.env differ diff --git a/Demos/ngeParticleEmitter/assets/gltf/shaderBall.glb b/Demos/ngeParticleEmitter/assets/gltf/shaderBall.glb new file mode 100644 index 0000000..f15f5d2 Binary files /dev/null and b/Demos/ngeParticleEmitter/assets/gltf/shaderBall.glb differ diff --git a/Demos/ngeParticleEmitter/assets/nge/emitter.json b/Demos/ngeParticleEmitter/assets/nge/emitter.json new file mode 100644 index 0000000..9221bf5 --- /dev/null +++ b/Demos/ngeParticleEmitter/assets/nge/emitter.json @@ -0,0 +1,559 @@ +{ + "tags": null, + "name": "node", + "editorData": { + "locations": [ + { + "blockId": 65, + "x": 1420, + "y": 1140, + "isCollapsed": false + }, + { + "blockId": 66, + "x": 700, + "y": 880, + "isCollapsed": false + }, + { + "blockId": 67, + "x": 320, + "y": 1240, + "isCollapsed": false + }, + { + "blockId": 68, + "x": 0, + "y": 1280, + "isCollapsed": false + }, + { + "blockId": 70, + "x": 700, + "y": 1600, + "isCollapsed": false + }, + { + "blockId": 71, + "x": 460, + "y": 1620, + "isCollapsed": false + }, + { + "blockId": 72, + "x": 700, + "y": 1100, + "isCollapsed": false + }, + { + "blockId": 73, + "x": 0, + "y": 820, + "isCollapsed": false + }, + { + "blockId": 74, + "x": 320, + "y": 820, + "isCollapsed": false + }, + { + "blockId": 75, + "x": -280, + "y": 1100, + "isCollapsed": false + }, + { + "blockId": 76, + "x": -280, + "y": 1200, + "isCollapsed": false + }, + { + "blockId": 77, + "x": 0, + "y": 1120, + "isCollapsed": false + }, + { + "blockId": 78, + "x": 320, + "y": 1080, + "isCollapsed": false + }, + { + "blockId": 79, + "x": 320, + "y": 1400, + "isCollapsed": false + }, + { + "blockId": 80, + "x": 1160, + "y": 1140, + "isCollapsed": false + }, + { + "blockId": 81, + "x": 700, + "y": 1360, + "isCollapsed": false + } + ], + "frames": [], + "x": -352.57634045680004, + "y": -680.6320078121998, + "zoom": 0.9509900499000001 + }, + "customType": "BABYLON.NodeGeometry", + "outputNodeId": 65, + "blocks": [ + { + "customType": "BABYLON.GeometryOutputBlock", + "id": 65, + "name": "Geometry Output", + "visibleOnFrame": false, + "inputs": [ + { + "name": "geometry", + "inputName": "geometry", + "targetBlockId": 80, + "targetConnectionName": "output", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + } + ], + "outputs": [] + }, + { + "customType": "BABYLON.MeshBlock", + "id": 66, + "name": "groundNode", + "visibleOnFrame": false, + "inputs": [], + "outputs": [ + { + "name": "geometry" + } + ], + "serializedCachedData": false, + "reverseWindingOrder": false + }, + { + "customType": "BABYLON.PlaneBlock", + "id": 67, + "name": "Plane", + "visibleOnFrame": false, + "inputs": [ + { + "name": "size", + "valueType": "number", + "value": 1, + "inputName": "size", + "targetBlockId": 68, + "targetConnectionName": "output", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + }, + { + "name": "width", + "valueType": "number", + "value": 0 + }, + { + "name": "height", + "valueType": "number", + "value": 0 + }, + { + "name": "subdivisions", + "valueType": "number", + "value": 1 + }, + { + "name": "subdivisionsX", + "valueType": "number", + "value": 0 + }, + { + "name": "subdivisionsY", + "valueType": "number", + "value": 0 + } + ], + "outputs": [ + { + "name": "geometry" + } + ], + "evaluateContext": false + }, + { + "customType": "BABYLON.GeometryInputBlock", + "id": 68, + "name": "Size", + "visibleOnFrame": false, + "inputs": [], + "outputs": [ + { + "name": "output" + } + ], + "type": 2, + "contextualValue": 0, + "min": 0, + "max": 0, + "groupInInspector": "", + "displayInInspector": true, + "valueType": "number", + "value": 0.01 + }, + { + "customType": "BABYLON.RotationXBlock", + "id": 70, + "name": "Rotation X", + "visibleOnFrame": false, + "inputs": [ + { + "name": "angle", + "valueType": "number", + "value": 0, + "inputName": "angle", + "targetBlockId": 71, + "targetConnectionName": "output", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + } + ], + "outputs": [ + { + "name": "matrix" + } + ] + }, + { + "customType": "BABYLON.GeometryInputBlock", + "id": 71, + "name": "Angle", + "visibleOnFrame": false, + "inputs": [], + "outputs": [ + { + "name": "output" + } + ], + "type": 2, + "contextualValue": 0, + "min": 0, + "max": 0, + "groupInInspector": "", + "displayInInspector": true, + "valueType": "number", + "value": 1.571 + }, + { + "customType": "BABYLON.ConditionBlock", + "id": 72, + "name": "Less than", + "visibleOnFrame": false, + "inputs": [ + { + "name": "left", + "inputName": "left", + "targetBlockId": 74, + "targetConnectionName": "r", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + }, + { + "name": "right", + "valueType": "number", + "value": 0, + "inputName": "right", + "targetBlockId": 78, + "targetConnectionName": "output", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + }, + { + "name": "ifTrue", + "valueType": "number", + "value": 1, + "inputName": "ifTrue", + "targetBlockId": 67, + "targetConnectionName": "geometry", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + }, + { + "name": "ifFalse", + "valueType": "number", + "value": 0, + "inputName": "ifFalse", + "targetBlockId": 79, + "targetConnectionName": "geometry", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + } + ], + "outputs": [ + { + "name": "output" + } + ], + "test": 2 + }, + { + "customType": "BABYLON.GeometryTextureBlock", + "id": 73, + "name": "maskTex", + "visibleOnFrame": false, + "inputs": [], + "outputs": [ + { + "name": "texture" + } + ], + "width": 512, + "height": 512, + "serializedCachedData": false + }, + { + "customType": "BABYLON.GeometryTextureFetchBlock", + "id": 74, + "name": "Texture Fetch", + "visibleOnFrame": false, + "inputs": [ + { + "name": "texture", + "inputName": "texture", + "targetBlockId": 73, + "targetConnectionName": "texture", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + }, + { + "name": "coordinates", + "inputName": "coordinates", + "targetBlockId": 77, + "targetConnectionName": "output", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + } + ], + "outputs": [ + { + "name": "rgba" + }, + { + "name": "rgb" + }, + { + "name": "r" + }, + { + "name": "g" + }, + { + "name": "b" + }, + { + "name": "a" + } + ], + "clampCoordinates": true + }, + { + "customType": "BABYLON.GeometryInputBlock", + "id": 75, + "name": "UV1s", + "visibleOnFrame": false, + "inputs": [], + "outputs": [ + { + "name": "output" + } + ], + "type": 4, + "contextualValue": 4, + "min": 0, + "max": 0, + "groupInInspector": "", + "displayInInspector": true + }, + { + "customType": "BABYLON.GeometryInputBlock", + "id": 76, + "name": "uvOffset", + "visibleOnFrame": false, + "inputs": [], + "outputs": [ + { + "name": "output" + } + ], + "type": 4, + "contextualValue": 0, + "min": 0, + "max": 0, + "groupInInspector": "", + "displayInInspector": true, + "valueType": "BABYLON.Vector2", + "value": [ + 0, + 0 + ] + }, + { + "customType": "BABYLON.MathBlock", + "id": 77, + "name": "Add", + "visibleOnFrame": false, + "inputs": [ + { + "name": "left", + "inputName": "left", + "targetBlockId": 75, + "targetConnectionName": "output", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + }, + { + "name": "right", + "inputName": "right", + "targetBlockId": 76, + "targetConnectionName": "output", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + } + ], + "outputs": [ + { + "name": "output" + } + ], + "operation": 0 + }, + { + "customType": "BABYLON.GeometryInputBlock", + "id": 78, + "name": "Float", + "visibleOnFrame": false, + "inputs": [], + "outputs": [ + { + "name": "output" + } + ], + "type": 2, + "contextualValue": 0, + "min": 0, + "max": 0, + "groupInInspector": "", + "displayInInspector": true, + "valueType": "number", + "value": 0.5 + }, + { + "customType": "BABYLON.NullBlock", + "id": 79, + "name": "Null", + "visibleOnFrame": false, + "inputs": [], + "outputs": [ + { + "name": "geometry" + }, + { + "name": "vector" + } + ] + }, + { + "customType": "BABYLON.InstantiateOnFacesBlock", + "id": 80, + "name": "Instantiate on faces", + "visibleOnFrame": false, + "inputs": [ + { + "name": "geometry", + "inputName": "geometry", + "targetBlockId": 66, + "targetConnectionName": "geometry", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + }, + { + "name": "instance", + "inputName": "instance", + "targetBlockId": 72, + "targetConnectionName": "output", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + }, + { + "name": "count", + "valueType": "number", + "value": 256, + "inputName": "count", + "targetBlockId": 81, + "targetConnectionName": "output", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + }, + { + "name": "matrix", + "inputName": "matrix", + "targetBlockId": 70, + "targetConnectionName": "matrix", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + }, + { + "name": "rotation", + "valueType": "BABYLON.Vector3", + "value": [ + 0, + 0, + 0 + ] + }, + { + "name": "scaling", + "valueType": "BABYLON.Vector3", + "value": [ + 1, + 1, + 1 + ] + } + ], + "outputs": [ + { + "name": "output" + } + ], + "evaluateContext": true + }, + { + "customType": "BABYLON.GeometryInputBlock", + "id": 81, + "name": "count", + "visibleOnFrame": false, + "inputs": [], + "outputs": [ + { + "name": "output" + } + ], + "type": 1, + "contextualValue": 0, + "min": 0, + "max": 0, + "groupInInspector": "", + "displayInInspector": true, + "valueType": "number", + "value": 256 + } + ] +} \ No newline at end of file diff --git a/Demos/ngeParticleEmitter/assets/nge/ground.json b/Demos/ngeParticleEmitter/assets/nge/ground.json new file mode 100644 index 0000000..e64ee85 --- /dev/null +++ b/Demos/ngeParticleEmitter/assets/nge/ground.json @@ -0,0 +1,589 @@ +{ + "tags": null, + "name": "node", + "editorData": { + "locations": [ + { + "blockId": 4, + "x": 1120, + "y": 460, + "isCollapsed": false + }, + { + "blockId": 65, + "x": 300, + "y": 480, + "isCollapsed": false + }, + { + "blockId": 66, + "x": 0, + "y": 480, + "isCollapsed": false + }, + { + "blockId": 67, + "x": 0, + "y": 560, + "isCollapsed": false + }, + { + "blockId": 104, + "x": 0, + "y": 660, + "isCollapsed": false + }, + { + "blockId": 115, + "x": -300, + "y": 760, + "isCollapsed": false + }, + { + "blockId": 116, + "x": -720, + "y": 720, + "isCollapsed": false + }, + { + "blockId": 117, + "x": 600, + "y": 460, + "isCollapsed": false + }, + { + "blockId": 118, + "x": -300, + "y": 980, + "isCollapsed": false + }, + { + "blockId": 119, + "x": 0, + "y": 840, + "isCollapsed": false + }, + { + "blockId": 120, + "x": 300, + "y": 820, + "isCollapsed": false + }, + { + "blockId": 123, + "x": 860, + "y": 460, + "isCollapsed": false + }, + { + "blockId": 1822, + "x": -720, + "y": 840, + "isCollapsed": false + }, + { + "blockId": 1825, + "x": -720, + "y": 940, + "isCollapsed": false + }, + { + "blockId": 1828, + "x": -720, + "y": 1040, + "isCollapsed": false + } + ], + "frames": [], + "x": 421.5239892778387, + "y": 302.7400608201827, + "zoom": 0.4710612626096918 + }, + "customType": "BABYLON.NodeGeometry", + "outputNodeId": 4, + "blocks": [ + { + "customType": "BABYLON.GeometryOutputBlock", + "id": 4, + "name": "Geometry Output", + "visibleOnFrame": false, + "inputs": [ + { + "name": "geometry", + "inputName": "geometry", + "targetBlockId": 123, + "targetConnectionName": "output", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + } + ], + "outputs": [] + }, + { + "customType": "BABYLON.GridBlock", + "id": 65, + "name": "Grid", + "visibleOnFrame": false, + "inputs": [ + { + "name": "width", + "valueType": "number", + "value": 1, + "inputName": "width", + "targetBlockId": 66, + "targetConnectionName": "output", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + }, + { + "name": "height", + "valueType": "number", + "value": 1, + "inputName": "height", + "targetBlockId": 67, + "targetConnectionName": "output", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + }, + { + "name": "subdivisions", + "valueType": "number", + "value": 1, + "inputName": "subdivisions", + "targetBlockId": 104, + "targetConnectionName": "output", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + }, + { + "name": "subdivisionsX", + "valueType": "number", + "value": 0 + }, + { + "name": "subdivisionsY", + "valueType": "number", + "value": 0 + } + ], + "outputs": [ + { + "name": "geometry" + } + ], + "evaluateContext": false + }, + { + "customType": "BABYLON.GeometryInputBlock", + "id": 66, + "name": "Width", + "visibleOnFrame": false, + "inputs": [], + "outputs": [ + { + "name": "output" + } + ], + "type": 2, + "contextualValue": 0, + "min": 0, + "max": 0, + "groupInInspector": "", + "displayInInspector": true, + "valueType": "number", + "value": 5 + }, + { + "customType": "BABYLON.GeometryInputBlock", + "id": 67, + "name": "Height", + "visibleOnFrame": false, + "inputs": [], + "outputs": [ + { + "name": "output" + } + ], + "type": 2, + "contextualValue": 0, + "min": 0, + "max": 0, + "groupInInspector": "", + "displayInInspector": true, + "valueType": "number", + "value": 5 + }, + { + "customType": "BABYLON.GeometryInputBlock", + "id": 104, + "name": "Int", + "visibleOnFrame": false, + "inputs": [], + "outputs": [ + { + "name": "output" + } + ], + "type": 1, + "contextualValue": 0, + "min": 0, + "max": 0, + "groupInInspector": "", + "displayInInspector": true, + "valueType": "number", + "value": 20 + }, + { + "customType": "BABYLON.NoiseBlock", + "id": 115, + "name": "Noise", + "visibleOnFrame": false, + "inputs": [ + { + "name": "offset", + "valueType": "BABYLON.Vector3", + "value": [ + 0, + 0, + 0 + ], + "inputName": "offset", + "targetBlockId": 116, + "targetConnectionName": "output", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + }, + { + "name": "scale", + "valueType": "number", + "value": 0.11, + "inputName": "scale", + "targetBlockId": 1822, + "targetConnectionName": "output", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + }, + { + "name": "octaves", + "valueType": "number", + "value": 1.76, + "inputName": "octaves", + "targetBlockId": 1825, + "targetConnectionName": "output", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + }, + { + "name": "roughness", + "valueType": "number", + "value": 0.17, + "inputName": "roughness", + "targetBlockId": 1828, + "targetConnectionName": "output", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + } + ], + "outputs": [ + { + "name": "output" + } + ] + }, + { + "customType": "BABYLON.GeometryInputBlock", + "id": 116, + "name": "Positions", + "visibleOnFrame": false, + "inputs": [], + "outputs": [ + { + "name": "output" + } + ], + "type": 8, + "contextualValue": 1, + "min": 0, + "max": 0, + "groupInInspector": "", + "displayInInspector": true + }, + { + "customType": "BABYLON.SetPositionsBlock", + "id": 117, + "name": "Set positions", + "visibleOnFrame": false, + "inputs": [ + { + "name": "geometry", + "inputName": "geometry", + "targetBlockId": 65, + "targetConnectionName": "geometry", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + }, + { + "name": "positions", + "inputName": "positions", + "targetBlockId": 120, + "targetConnectionName": "xyz", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + } + ], + "outputs": [ + { + "name": "output" + } + ], + "evaluateContext": true + }, + { + "customType": "BABYLON.VectorConverterBlock", + "id": 118, + "name": "Converter", + "visibleOnFrame": false, + "inputs": [ + { + "name": "xyzw " + }, + { + "name": "xyz ", + "inputName": "xyz ", + "targetBlockId": 116, + "targetConnectionName": "output", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + }, + { + "name": "xy " + }, + { + "name": "zw " + }, + { + "name": "x " + }, + { + "name": "y " + }, + { + "name": "z " + }, + { + "name": "w " + } + ], + "outputs": [ + { + "name": "xyzw" + }, + { + "name": "xyz" + }, + { + "name": "xy" + }, + { + "name": "zw" + }, + { + "name": "x" + }, + { + "name": "y" + }, + { + "name": "z" + }, + { + "name": "w" + } + ] + }, + { + "customType": "BABYLON.MathBlock", + "id": 119, + "name": "Add", + "visibleOnFrame": false, + "inputs": [ + { + "name": "left", + "inputName": "left", + "targetBlockId": 115, + "targetConnectionName": "output", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + }, + { + "name": "right", + "inputName": "right", + "targetBlockId": 118, + "targetConnectionName": "y", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + } + ], + "outputs": [ + { + "name": "output" + } + ], + "operation": 0 + }, + { + "customType": "BABYLON.VectorConverterBlock", + "id": 120, + "name": "Converter", + "visibleOnFrame": false, + "inputs": [ + { + "name": "xyzw " + }, + { + "name": "xyz " + }, + { + "name": "xy " + }, + { + "name": "zw " + }, + { + "name": "x ", + "inputName": "x ", + "targetBlockId": 118, + "targetConnectionName": "x", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + }, + { + "name": "y ", + "inputName": "y ", + "targetBlockId": 119, + "targetConnectionName": "output", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + }, + { + "name": "z ", + "inputName": "z ", + "targetBlockId": 118, + "targetConnectionName": "z", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + }, + { + "name": "w " + } + ], + "outputs": [ + { + "name": "xyzw" + }, + { + "name": "xyz" + }, + { + "name": "xy" + }, + { + "name": "zw" + }, + { + "name": "x" + }, + { + "name": "y" + }, + { + "name": "z" + }, + { + "name": "w" + } + ] + }, + { + "customType": "BABYLON.ComputeNormalsBlock", + "id": 123, + "name": "Compute normals", + "visibleOnFrame": false, + "inputs": [ + { + "name": "geometry", + "inputName": "geometry", + "targetBlockId": 117, + "targetConnectionName": "output", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + } + ], + "outputs": [ + { + "name": "output" + } + ] + }, + { + "customType": "BABYLON.GeometryInputBlock", + "id": 1822, + "name": "Float", + "visibleOnFrame": false, + "inputs": [], + "outputs": [ + { + "name": "output" + } + ], + "type": 2, + "contextualValue": 0, + "min": -1, + "max": 1, + "groupInInspector": "", + "displayInInspector": true, + "valueType": "number", + "value": -0.34 + }, + { + "customType": "BABYLON.GeometryInputBlock", + "id": 1825, + "name": "Float", + "visibleOnFrame": false, + "inputs": [], + "outputs": [ + { + "name": "output" + } + ], + "type": 2, + "contextualValue": 0, + "min": 0, + "max": 0, + "groupInInspector": "", + "displayInInspector": true, + "valueType": "number", + "value": 1 + }, + { + "customType": "BABYLON.GeometryInputBlock", + "id": 1828, + "name": "Float", + "visibleOnFrame": false, + "inputs": [], + "outputs": [ + { + "name": "output" + } + ], + "type": 2, + "contextualValue": 0, + "min": 0, + "max": 1, + "groupInInspector": "", + "displayInInspector": true, + "valueType": "number", + "value": 0.24 + } + ] +} \ No newline at end of file diff --git a/Demos/ngeParticleEmitter/assets/particles/meshEmitterSystem.json b/Demos/ngeParticleEmitter/assets/particles/meshEmitterSystem.json new file mode 100644 index 0000000..257962a --- /dev/null +++ b/Demos/ngeParticleEmitter/assets/particles/meshEmitterSystem.json @@ -0,0 +1 @@ +{"name":"CPU particle system","id":"default system","capacity":10000,"disposeOnStop":false,"manualEmitCount":-1,"emitterId":"emitter","particleEmitterType":{"type":"MeshParticleEmitter","direction1":[0,1,0],"direction2":[0,1,0],"meshId":"emitter","useMeshNormalsForDirection":true},"texture":{"tags":null,"url":"https://assets.babylonjs.com/textures/flare.png","uOffset":0,"vOffset":0,"uScale":1,"vScale":1,"uAng":0,"vAng":0,"wAng":0,"uRotationCenter":0.5,"vRotationCenter":0.5,"wRotationCenter":0.5,"homogeneousRotationInUVTransform":false,"isBlocking":true,"name":"https://assets.babylonjs.com/textures/flare.png","hasAlpha":false,"getAlphaFromRGB":false,"level":1,"coordinatesIndex":0,"optimizeUVAllocation":true,"coordinatesMode":0,"wrapU":1,"wrapV":1,"wrapR":1,"anisotropicFilteringLevel":4,"isCube":false,"is3D":false,"is2DArray":false,"gammaSpace":true,"invertZ":false,"lodLevelInAlpha":false,"lodGenerationOffset":0,"lodGenerationScale":0,"linearSpecularLOD":false,"isRenderTarget":false,"animations":[],"invertY":true,"samplingMode":3,"_useSRGBBuffer":false,"internalTextureLabel":"https://assets.babylonjs.com/textures/flare.png","noMipmap":false},"isLocal":false,"animations":[],"beginAnimationOnStart":false,"beginAnimationFrom":0,"beginAnimationTo":60,"beginAnimationLoop":false,"startDelay":0,"renderingGroupId":0,"isBillboardBased":true,"billboardMode":7,"minAngularSpeed":0,"maxAngularSpeed":0,"minSize":0.1,"maxSize":0.1,"minScaleX":1,"maxScaleX":1,"minScaleY":1,"maxScaleY":1,"minEmitPower":0.05,"maxEmitPower":0.05,"minLifeTime":2,"maxLifeTime":2.5,"emitRate":1500,"gravity":[0,0,0],"noiseStrength":[10,10,10],"color1":[0.5882352941176471,0.08627450980392157,0.08627450980392157,1],"color2":[0.9215686274509803,0.34509803921568627,0.047058823529411764,1],"colorDead":[0.00784313725490196,0.00784313725490196,0.00784313725490196,1],"updateSpeed":0.016666666666666666,"targetStopDuration":0,"blendMode":2,"preWarmCycles":0,"preWarmStepOffset":1,"minInitialRotation":0,"maxInitialRotation":0,"startSpriteCellID":0,"spriteCellLoop":true,"endSpriteCellID":0,"spriteCellChangeSpeed":1,"spriteCellWidth":0,"spriteCellHeight":0,"spriteRandomStartCell":false,"isAnimationSheetEnabled":false,"useLogarithmicDepth":false,"colorGradients":[{"gradient":0,"color1":[0,0,0,1],"color2":[0,0,0,1]},{"gradient":0.33,"color1":[0.27450980392156865,0.03137254901960784,0.03137254901960784,1],"color2":[0.4,0.2196078431372549,0.07058823529411765,1]},{"gradient":0.73,"color1":[0.21568627450980393,0.10588235294117647,0.3803921568627451,1],"color2":[0.24313725490196078,0.08235294117647059,0.4470588235294118,1]},{"gradient":1,"color1":[0,0,0,1],"color2":[0,0,0,1]}],"sizeGradients":[{"gradient":0,"factor1":0.3,"factor2":0.35},{"gradient":0.38,"factor1":0.15,"factor2":0.05}],"velocityGradients":[{"gradient":0,"factor1":1,"factor2":1},{"gradient":1,"factor1":5,"factor2":8}],"textureMask":[1,1,1,1],"customShader":null,"preventAutoStart":false,"worldOffset":[0,0,0]} \ No newline at end of file diff --git a/Demos/ngeParticleEmitter/assets/shaders/emissiveColor.json b/Demos/ngeParticleEmitter/assets/shaders/emissiveColor.json new file mode 100644 index 0000000..b1e660a --- /dev/null +++ b/Demos/ngeParticleEmitter/assets/shaders/emissiveColor.json @@ -0,0 +1,332 @@ +{ + "tags": null, + "ignoreAlpha": false, + "maxSimultaneousLights": 4, + "mode": 0, + "forceAlphaBlending": false, + "id": "node", + "name": "node", + "checkReadyOnEveryCall": false, + "checkReadyOnlyOnce": false, + "state": "", + "alpha": 1, + "backFaceCulling": true, + "cullBackFaces": true, + "alphaMode": 2, + "_needDepthPrePass": false, + "disableDepthWrite": false, + "disableColorWrite": false, + "forceDepthWrite": false, + "depthFunction": 0, + "separateCullingPass": false, + "fogEnabled": true, + "pointSize": 1, + "zOffset": 0, + "zOffsetUnits": 0, + "pointsCloud": false, + "fillMode": 0, + "editorData": { + "locations": [ + { + "blockId": 10, + "x": 840, + "y": 140, + "isCollapsed": false + }, + { + "blockId": 9, + "x": 595, + "y": 70, + "isCollapsed": false + }, + { + "blockId": 7, + "x": 315, + "y": 0, + "isCollapsed": false + }, + { + "blockId": 5, + "x": 0, + "y": 0, + "isCollapsed": false + }, + { + "blockId": 6, + "x": 0, + "y": 175, + "isCollapsed": false + }, + { + "blockId": 8, + "x": 280, + "y": 210, + "isCollapsed": false + }, + { + "blockId": 12, + "x": 840, + "y": 315, + "isCollapsed": false + }, + { + "blockId": 39, + "x": 490, + "y": 385, + "isCollapsed": false + } + ], + "frames": [], + "x": 53, + "y": 115, + "zoom": 1 + }, + "customType": "BABYLON.NodeMaterial", + "outputNodes": [ + 10, + 12 + ], + "blocks": [ + { + "customType": "BABYLON.VertexOutputBlock", + "id": 10, + "name": "VertexOutput", + "comments": "", + "visibleInInspector": false, + "visibleOnFrame": false, + "target": 1, + "inputs": [ + { + "name": "vector", + "inputName": "vector", + "targetBlockId": 9, + "targetConnectionName": "output", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + } + ], + "outputs": [] + }, + { + "customType": "BABYLON.TransformBlock", + "id": 9, + "name": "WorldPos * ViewProjectionTransform", + "comments": "", + "visibleInInspector": false, + "visibleOnFrame": false, + "target": 1, + "inputs": [ + { + "name": "vector", + "inputName": "vector", + "targetBlockId": 7, + "targetConnectionName": "output", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + }, + { + "name": "transform", + "inputName": "transform", + "targetBlockId": 8, + "targetConnectionName": "output", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + } + ], + "outputs": [ + { + "name": "output" + }, + { + "name": "xyz" + } + ], + "complementZ": 0, + "complementW": 1 + }, + { + "customType": "BABYLON.TransformBlock", + "id": 7, + "name": "WorldPos", + "comments": "", + "visibleInInspector": false, + "visibleOnFrame": false, + "target": 1, + "inputs": [ + { + "name": "vector", + "inputName": "vector", + "targetBlockId": 5, + "targetConnectionName": "output", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + }, + { + "name": "transform", + "inputName": "transform", + "targetBlockId": 6, + "targetConnectionName": "output", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + } + ], + "outputs": [ + { + "name": "output" + }, + { + "name": "xyz" + } + ], + "complementZ": 0, + "complementW": 1 + }, + { + "customType": "BABYLON.InputBlock", + "id": 5, + "name": "position", + "comments": "", + "visibleInInspector": false, + "visibleOnFrame": false, + "target": 1, + "inputs": [], + "outputs": [ + { + "name": "output" + } + ], + "type": 8, + "mode": 1, + "systemValue": null, + "animationType": 0, + "min": 0, + "max": 0, + "isBoolean": false, + "matrixMode": 0, + "isConstant": false, + "groupInInspector": "", + "convertToGammaSpace": false, + "convertToLinearSpace": false + }, + { + "customType": "BABYLON.InputBlock", + "id": 6, + "name": "World", + "comments": "", + "visibleInInspector": false, + "visibleOnFrame": false, + "target": 1, + "inputs": [], + "outputs": [ + { + "name": "output" + } + ], + "type": 128, + "mode": 0, + "systemValue": 1, + "animationType": 0, + "min": 0, + "max": 0, + "isBoolean": false, + "matrixMode": 0, + "isConstant": false, + "groupInInspector": "", + "convertToGammaSpace": false, + "convertToLinearSpace": false + }, + { + "customType": "BABYLON.InputBlock", + "id": 8, + "name": "ViewProjection", + "comments": "", + "visibleInInspector": false, + "visibleOnFrame": false, + "target": 1, + "inputs": [], + "outputs": [ + { + "name": "output" + } + ], + "type": 128, + "mode": 0, + "systemValue": 4, + "animationType": 0, + "min": 0, + "max": 0, + "isBoolean": false, + "matrixMode": 0, + "isConstant": false, + "groupInInspector": "", + "convertToGammaSpace": false, + "convertToLinearSpace": false + }, + { + "customType": "BABYLON.FragmentOutputBlock", + "id": 12, + "name": "FragmentOutput", + "comments": "", + "visibleInInspector": false, + "visibleOnFrame": false, + "target": 2, + "inputs": [ + { + "name": "rgba" + }, + { + "name": "rgb", + "inputName": "rgb", + "targetBlockId": 39, + "targetConnectionName": "output", + "isExposedOnFrame": true, + "exposedPortPosition": -1 + }, + { + "name": "a" + }, + { + "name": "glow" + } + ], + "outputs": [], + "convertToGammaSpace": false, + "convertToLinearSpace": false, + "useLogarithmicDepth": false + }, + { + "customType": "BABYLON.InputBlock", + "id": 39, + "name": "emitterColor", + "comments": "", + "visibleInInspector": false, + "visibleOnFrame": false, + "target": 1, + "inputs": [], + "outputs": [ + { + "name": "output" + } + ], + "type": 32, + "mode": 0, + "systemValue": null, + "animationType": 0, + "min": 0, + "max": 0, + "isBoolean": false, + "matrixMode": 0, + "isConstant": false, + "groupInInspector": "", + "convertToGammaSpace": false, + "convertToLinearSpace": false, + "valueType": "BABYLON.Color3", + "value": [ + 0.3058823529411765, + 0.9137254901960784, + 0.1411764705882353 + ] + } + ], + "uniqueId": 4 +} \ No newline at end of file diff --git a/Demos/ngeParticleEmitter/assets/textures/mask.png b/Demos/ngeParticleEmitter/assets/textures/mask.png new file mode 100644 index 0000000..a91e867 Binary files /dev/null and b/Demos/ngeParticleEmitter/assets/textures/mask.png differ