Git Product home page Git Product logo

suica's Introduction

Suica

Mobile 3D made simple. As simple, as this live demo:

<!DOCTYPE html>

<script src="suica.js"></script>

<suica>
    <demo>
    <cube>
</suica>

Go to boytchev.github.io/suica for more details.

suica's People

Contributors

boytchev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

diegobona

suica's Issues

Cheat sheet

Consider adding embedded help system, so that programmers can use the console to quickly get info about a Suica command. For example, tube.help may contain the constructor syntax of class tube.

Dotted lines

Easier setting of dotted lines (incl. wireframed objects)

Redesign onTime

Redesign onTime to match the other events (this will free the name onTime)

Object as points

When an object is used as a point, its center is used. So, it could be possible to make a segment between two circles, eliminating the need to specify their centers.

Suica.current and suica

Consider replacing the use of Suica.current with suica, which is the lastest Suica instance too.

Split user guide

The user guide is too big. Split its sections into individual files.

Custom shape

A possibility to define custom shape, for example, by a sequence of points, or by Canvas2D shape, etc.

Y-up and Z-up

Support various orientations of the coordinate system: at least Y-up and Z-up

Random in object

The function random with parameter a 3D object could return a random point inside the object.

Global Suica variable `its`

Proposal: a global variable its equal to the latest created Suica object. This will make it possible to set custom properties of objects without using style and without giving a name.

With name:

a = cube( );
a.color = 'linen';

With style:

cube( ).style({color: 'linen'});

The new proposed its:

cube( );
its.color = 'linen';

Optimize drawing's fillAndStroke

Drawings have fill and stroke, so fillAndStroke might be unnecessary. However, currently both fill and stroke initiate a new path. If they can reuse the path, they can set a flag, so the path is created only when a path-modification command is issues, like moveTo, lineTo and curveTo.

lineTo with multiple lines

Allow lineTo to have several points and to draw complex line. So:

lineTo( 1, 2, 3, 4, 5, 6 );

would be equivalent to:

lineTo( 1, 2 );
lineTo( 3, 4 );
lineTo( 5, 6 );

and

<lineTo point="1, 2, 3, 4, 5, 6">

would be equivalent to:

<lineTo point="1, 2">
<lineTo point="3, 4">
<lineTo point="5, 6">

Cloning in HTML

Example:

This is equivalent to:

a = circle( [40,0,10], 15, 'blue' );
b = a.clone;
b.center = [10,10,2];

VR modes

VR mode for advance glasses (e.g. Oculus Quest 2), for simple VR glasses (that use smartphone split screen) and for anaglyph glasses.

CSG

Possibility to construct objects with CSG

Reusing drawings commands

Drawing commands (moveTo, lineTo, curveTo, arc) can be reused to define paths for extruded 3D objects. Internally they will have different implementation, but this different will be hidden from the user.

Objects with custom behaviour

Objects may have onUpdate callback activated every frame. It may implement object-specific behaviour (e.g. animation).

Attribute parsers

Some attribute parsers may make the code simpler and easier to understand. For example, parser of exclusive boolean values (see example) or parsers of array of points.

Example of exclusive attributes:
<spline ... closed>
<spline ... closed="true">
<spline ... closed="1">
<spline ... closed="yes">
<spline ... open>
<spline ... open="true">
<spline ... open="1">
<spline ... open="yes">

3D text

3D text (some default font as well as possibility to change it)

Extrude object

A feature to create custom 3D objects extruded from 2D shapes.

Orientation conflicts with Google Fonts

When Google Fonts are used, the orientation looks fine; when they are not used - it is broken.

When the commented line is commented, the demo( ) does not rotate the coordinate system as expected. When it is uncommented, demo( ) works fine.

image

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.