![New axobject-query Maintainer Faces Backlash Over Controversial Decision to Support Legacy Node.js Versions](https://cdn.sanity.io/images/cgdhsj6q/production/86e6ebdea652d20da070ebbda20134b839972db7-1024x1024.webp?w=800&fit=max&auto=format)
Security News
New axobject-query Maintainer Faces Backlash Over Controversial Decision to Support Legacy Node.js Versions
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.
claygl-next
Advanced tools
Readme
ClayGL is a type friendly WebGL graphic library for building scalable Web3D applications.
It's easy to use, configurable for high-quality graphics. Benefit from the modularity and tree shaking, it can be scaled down to 22k(gzipped) for a basic 3D application.
<!DOCTYPE html>
<html lang="en">
<head>
<script src="lib/claygl.js"></script>
</head>
<body>
<canvas id="main"></canvas>
<script>
const app = new clay.App3D('#main', {
width: window.innerWidth,
height: window.innerHeight
});
// Create camera
const camera = app.createCamera([0, 2, 5], [0, 0, 0]);
// Create a RED cube
const cube = app.createCube({
color: '#f00'
});
// Create light
const mainLight = app.createDirectionalLight([-1, -1, -1]);
app.loop((frameTime) => {
cube.rotation.rotateY(frameTime / 1000);
});
</script>
</body>
</html>
This example is about 22k(gzipped) after bundled by webpack 4.0. It draws a triangle on the screen.
import { Renderer, GeometryBase, Shader, Material, glsl } from 'claygl';
const vs = new Shader.Vertex({
attributes: {
position: Shader.attribute('vec3', 'POSITION')
},
main: glsl`
void main() {
gl_Position = vec4(position, 1.0);
}`
});
const fs = new Shader.Fragment({
uniforms: {
color: Shader.uniform('rgb', 'red')
},
main: glsl`
void main() {
gl_FragColor = vec4(color, 1.0);
}
`
});
const renderer = new Renderer({
canvas: document.getElementById('main')
});
renderer.resize(400, 400);
const geometry = new GeometryBase();
const positionAttrib = geometry.createAttribute('position', 'float', 3);
// Add triangle vertices to position attribute.
positionAttrib.fromArray([
[-0.5, -0.5, 0],
[0.5, -0.5, 0],
[0, 0.5, 0]
]);
const material = new Material(new Shader(vs, fs));
// 'color' have correct type here.
material.set('color', 'red');
renderer.renderPass([{ geometry, material }]);
Needs python3.3 and FBX SDK 2018.1.1.
usage: fbx2gltf.py [-h] [-e EXCLUDE] [-t TIMERANGE] [-o OUTPUT]
[-f FRAMERATE] [-p POSE] [-q] [-b]
file
FBX to glTF converter
positional arguments:
file
optional arguments:
-h, --help show this help message and exit
-e EXCLUDE, --exclude EXCLUDE
Data excluded. Can be: scene,animation
-t TIMERANGE, --timerange TIMERANGE
Export animation time, in format
'startSecond,endSecond'
-o OUTPUT, --output OUTPUT
Ouput glTF file path
-f FRAMERATE, --framerate FRAMERATE
Animation frame per second
-p POSE, --pose POSE Start pose time
-q, --quantize Quantize accessors with WEB3D_quantized_attributes
extension
-b, --binary Export glTF-binary
--beautify Beautify json output.
--noflipv If not flip v in texcoord.
Input:
Output:
FAQs
A 3D graphic library
The npm package claygl-next receives a total of 42 weekly downloads. As such, claygl-next popularity was classified as not popular.
We found that claygl-next demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.
Security News
Results from the 2023 State of JavaScript Survey highlight key trends, including Vite's dominance, rising TypeScript adoption, and the enduring popularity of React. Discover more insights on developer preferences and technology usage.
Security News
The US Justice Department has penalized two consulting firms $11.3 million for failing to meet cybersecurity requirements on federally funded projects, emphasizing strict enforcement to protect sensitive government data.