Git Product home page Git Product logo

three.js-shader-animation's Introduction

3D Models Configuration

This JSON defines the configuration for 3D models, allowing specification of various attributes for each model. Model Attributes: • ID (Mandatory): Unique identifier for each model. • Name (Mandatory): Display name of the model. • Color (Optional): RGB values representing the model color to override the default. • URL (Mandatory): Path to the model file. • Animation ID (Optional): Identifier for associated animations. • Scale (Optional): Scaling factors for the model along the x, y, and z axes. Defaults to [1, 1, 1] if not provided. • Position (Optional): Initial position of the model in 3D space. Defaults to [0, 0, 0] if not provided. • Rotation (Optional): Initial rotation angles of the model in 3D space. Defaults to [0, 0, 0] if not provided.

Key Points:

  1. If a color attribute is provided in the JSON, it replaces all model points; else, the model defaults to white.
  2. Position, rotation, and scale attributes in JSON act as offsets, modifying the model's placement.

Multiple Models If an array contains multiple child arrays, the models within those child arrays will be processed as merged geometry. This enables the creation of complex scenes with multiple models combined.

{ "models": [ [{ "id": "1", "name": "lincoln", "animationId": 3, // axisexplode in timeline1 "url": "assets/models/lincoln.drc" }], [{ "id": "5", "name": "A", "url": "assets/models/A_10000.drc" }, { "id": "5", "name": "R", "url": "assets/models/R_10000.drc", "animationId": 11 // fadein timeline 1 }, { "id": "5", "name": "I", "url": "assets/models/I_10000.drc" // no effect

        },
        {
            "id": "5",
            "name": "VS",
            "url": "assets/models/VS_10000.drc"

        }
    ],
    [{
            "id": "6",
            "name": "A",
            "url": "assets/models/A_25000.drc"
        },
        {
            "id": "6",
            "name": "R",
            "url": "assets/models/R_25000.drc",
            "animationId": 12, explode in timeline 1 
        },
        {
            "id": "6",
            "name": "I",
            "url": "assets/models/I_25000.drc"
        },
        {
            "id": "6",
            "name": "VS",
            "url": "assets/models/VS_25000.drc"

        }
    ],
    [{
        "id": "2",
        "animationId": 3,
        "name": "R_10000",
        "url": "assets/models/R_10000.drc"
    }],
    [{
        "animationId": 3,
        "id": "3",
        "name": "A_10000",
        "url": "assets/models/A_10000.drc"

    }],
    [  // merge arivs
        {

            "id": "4",
            "name": "A",
            "color": { "r": 1, "g": 1, "b": 1 },
            "url": "assets/models/A_50000.drc",
            "animationId": 3,
            "scale": { "x": 1, "y": 1, "z": 1 },
            "position": { "x": 2, "y": 0, "z": 0 }, // offset x+=1
            "rotation": { "x": 0, "y": 0, "z": 0 }
        },
        {
            "id": "4",
            "name": "R",
            "color": { "r": 0.6938719153404236, "g": 0.09758713096380234, "b": 0.09758737683296204 },
            "url": "assets/models/R_50000.drc",
            "animationId": 11,
            "scale": { "x": 1, "y": 1, "z": 1 },
            "position": { "x": 0, "y": 0, "z": 0 },
            "rotation": { "x": 0, "y": 0, "z": 0 }
        },
        {
            "id": "4",
            "name": "I",
            "color": { "r": 1, "g": 1, "b": 1 },
            "url": "assets/models/I_50000.drc",
            "animationId": 3,
            "scale": { "x": 1, "y": 1, "z": 1 },
            "position": { "x": 0, "y": 0, "z": 0 },
            "rotation": { "x": 0, "y": 0, "z": 0 }
        },
        {
            "id": "4",
            "name": "VS",
            "color": { "r": 1, "g": 1, "b": 1 },
            "url": "assets/models/VS_50000.drc",
            "animationId": 3,
            "scale": { "x": 1, "y": 1, "z": 1 },
            "position": { "x": 0, "y": 0, "z": 0 },
            "rotation": { "x": 0, "y": 0, "z": 0 }
        }
    ]


]

}

run timeline.update() , im each swap to trigger animationId

simulation

brush force make how far the point mode gravity , lower gravity and higher brush force make more elastic effect

three.js-shader-animation's People

Watchers

softangel0090 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.