@@ -0,0 +1,2780 @@
+package com.inari.firefly.renderer;%0A%0Aimport java.util.Arrays;%0Aimport java.util.HashSet;%0Aimport java.util.Set;%0Aimport com.inari.firefly.asset.Asset;%0Aimport com.inari.firefly.component.attr.AttributeKey;%0Aimport com.inari.firefly.component.attr.AttributeMap;%0A%0Apublic final class ShaderAsset extends Asset %7B%0A%0A    public static final AttributeKey%3CBoolean%3E RESOURCE_BASED = new AttributeKey%3CBoolean%3E( %22resourceBased%22, Boolean.class, ShaderAsset.class );%0A    public static final AttributeKey%3CString%3E RESOURCE_NAME = new AttributeKey%3CString%3E( %22resourceName%22, String.class, ShaderAsset.class );%0A    public static final AttributeKey%3CString%3E SHADER_PROGRAM = new AttributeKey%3CString%3E( %22shaderProgram%22, String.class, ShaderAsset.class );%0A    private static final Set%3CAttributeKey%3C?%3E%3E ATTRIBUTE_KEYS = new HashSet%3CAttributeKey%3C?%3E%3E( Arrays.%3CAttributeKey%3C?%3E%3EasList( new AttributeKey%5B%5D %7B%0A        ASSET_GROUP,%0A        RESOURCE_BASED,%0A        RESOURCE_NAME,%0A        SHADER_PROGRAM%0A    %7D ) );%0A%0A    private boolean resourceBased;%0A    private String resourceName;%0A    private String shaderProgram;%0A%0A    ShaderAsset( int assetId ) %7B%0A        super( assetId );%0A        resourceBased = true;%0A    %7D%0A%0A    @Override%0A    public final Class%3CShaderAsset%3E getComponentType() %7B%0A        return ShaderAsset.class;%0A    %7D%0A%0A    public final boolean isResourceBased() %7B%0A        return resourceBased;%0A    %7D%0A%0A    public final void setResourceBased( boolean resourceBased ) %7B%0A        this.resourceBased = resourceBased;%0A    %7D%0A%0A    public final String getResourceName() %7B%0A        return resourceName;%0A    %7D%0A%0A    public final void setResourceName( String resourceName ) %7B%0A        this.resourceName = resourceName;%0A    %7D%0A%0A    public final String getShaderProgram() %7B%0A        return shaderProgram;%0A    %7D%0A%0A    public final void setShaderProgram( String shaderProgram ) %7B%0A        this.shaderProgram = shaderProgram;%0A    %7D%0A%0A    @Override%0A    public final Set%3CAttributeKey%3C?%3E%3E attributeKeys() %7B%0A        Set%3CAttributeKey%3C?%3E%3E attributeKeys = super.attributeKeys();%0A        attributeKeys.addAll( ATTRIBUTE_KEYS );%0A        return super.attributeKeys( attributeKeys );%0A    %7D%0A%0A    @Override%0A    public final void fromAttributes( AttributeMap attributes ) %7B%0A        super.fromAttributes( attributes );%0A        resourceBased = attributes.getValue( RESOURCE_BASED, resourceBased );%0A        resourceName = attributes.getValue( RESOURCE_NAME, resourceName );%0A        shaderProgram = attributes.getValue( SHADER_PROGRAM, shaderProgram );%0A    %7D%0A%0A    @Override%0A    public final void toAttributes( AttributeMap attributes ) %7B%0A        super.toAttributes( attributes );%0A        attributes.put( RESOURCE_BASED, resourceBased );%0A        attributes.put( RESOURCE_NAME, resourceName );%0A        attributes.put( SHADER_PROGRAM, shaderProgram );%0A    %7D%0A%7D%0A

create ShaderAsset